package [package].base;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * 通用页面跳转控制器
 *
 * @author [author]
 */
@Controller
public class BasePageController {

    /**
     * 通用页面跳转
     *
     * @param page
     * @return
     */
    @RequestMapping("/{page}.html")
    public String toPage(@PathVariable("page") String page) {
        return page;
    }

    /**
     * 心跳检测
     *
     * @return
     */
    @RequestMapping("/ping")
    @ResponseBody
    public String ping() {
        return "pang";
    }
}
